@extends('shared.adminBase')
@section('title','反馈详情')
@section('content')
    <section class="content-header">
        <h1>反馈详情</h1>
        <ol class="breadcrumb">
            <li><a href="{{URL::action('AdminController@innerIndex')}}"><i class="fa fa-dashboard"></i> 首页</a>
            </li>
            <li class="active">反馈详情</li>
        </ol>
    </section>
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <!-- /.box -->
                <div class="box">
                    <!-- /.box-header -->
                    <div class="box-body col-md-12">
                        <div class="form-group">
                            <table style="border-collapse:separate; border-spacing:0px 10px;">
                                <tr>
                                    <td style="text-align:right;">编号：</td>
                                    <td style="text-align:left;">{{$feed->user_feedback_id }}</td>
                                </tr>
                                <tr>
                                    <td style="text-align:right;">玩家ID：</td>
                                    <td style="text-align:left;">{{$feed->user_id }}</td>
                                </tr>
                                <tr>
                                    <td style="text-align:right;">玩家昵称：</td>
                                    <td style="text-align:left;">{{$feed->nickname }}</td>
                                </tr>
                                <tr>
                                    <td style="text-align:right;">联系方式：</td>
                                    <td style="text-align:left;">{{$feed->contact_way }}</td>
                                </tr>
                                <tr>
                                    <td style="text-align:right;">提交IP：</td>
                                    <td style="text-align:left;">{{$feed->client_ip }}</td>
                                </tr>
                                <tr>
                                    <td style="text-align:right;">反馈时间：</td>
                                    <td style="text-align:left;">{{$feed->create_date }}</td>
                                </tr>
                                <tr>
                                    <td style="text-align:right;">反馈内容：</td>
                                    <td style="text-align:left;">{{$feed->content }}</td>
                                </tr>

                            </table>
                        </div>
                        <div class="form-group">
                            <button type="button" onclick="del('{{$feed->user_feedback_id}}')" class="btn btn-default">删除</button>
                            <button type="button" onclick="history.back();" class="btn btn-default">返回</button>
                        </div>
                    </div>
                    <!-- /.box-body -->
                </div>
                <!-- /.box -->
            </div>
            <!-- /.col -->
        </div>
        <!-- /.row -->
    </section>

@endsection

<script type="text/javascript">

    //单个删除
    function del(id) {
        if (confirm('确定要删除该反馈吗？') == false) {
            return;
        }

        $.post('{{URL::action('GameController@deleteUserFeedback')}}', {
            'id': id,
            '_token': '{{csrf_token()}}'
        }, function (result) {

            if (result.success) {
                alert('删除成功');
                window.location.href = '{{URL::action('GameController@getUserFeedbackList')}}';
            }
            else {
                alert(result.info);
            }
        });
    }

</script>